package org.example.config;

import io.swagger.v3.oas.annotations.OpenAPIDefinition;
import io.swagger.v3.oas.annotations.info.Contact;
import io.swagger.v3.oas.annotations.info.Info;
import io.swagger.v3.oas.models.OpenAPI;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
    @OpenAPIDefinition(
            info = @Info(
                    title = "我的Swagger案例",
                    description = "一个测试接口",
                    version = "1.0.2",
                    contact = @Contact(
                            name = "张三",
                            url = "http://www.baidu.com",
                            email = "11@qq.com"
                    )
            )
    )
public class Swagger3Config {
//    @Bean
//    public OpenAPI getOpenAPI(){
//        OpenAPI openAPI = new OpenAPI();
//        Info info = new Info();
//        info.setTitle("我的Swagger案例");
//        info.description("一个测试接口");
//        info.setVersion("1.0.1");
//        openAPI.info(info);
//        return openAPI;
//    }
}
